#pragma once

#include "Containers/String.h"

namespace WH
{
#ifdef DEBUG
    WHENGINE_API void AssertFailed(
        const char8_t* InExpression
        , const CString& InMessage
        , const char8_t* InFile
        , int InLine
        , const char8_t* InFunction);
#endif
}

//断言宏，用法：
//GASSERT(false,U"我这里是一个断言")
#ifdef DEBUG
    #define GASSERT(Expression,Message) if(!(Expression)) WH::AssertFailed((const char8_t*)#Expression,Message,(const char8_t*)__FILE__,__LINE__,(const char8_t*)__FUNCTION__);
    #define GASSERTEXP(Expression) if(!(Expression)) WH::AssertFailed((const char8_t*)#Expression,CString(),(const char8_t*)__FILE__,__LINE__,(const char8_t*)__FUNCTION__);
#else
    #define GASSERT(...) 
    #define GASSERTEXP(...)
#endif